﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System.Windows.Media;
using AirCtrl.Wpf.Core;

namespace AirCtrl.Wpf.Views;

public partial class CameraViewModel : ObservableObject
{
    [ObservableProperty] private string _title;
    [ObservableProperty] private ImageSource _imageSource;
    [ObservableProperty] private string _info;

    private int _rotateAngel = 0;


    [RelayCommand]
    private void Rotate()
    {
        _rotateAngel += 90;
        _rotateAngel %= 360;

        DevicesConfig.Instance.CameraRotateAngle[Title] = _rotateAngel;
    }
}